﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CTP.CRM.Core.Common.Constants
{
    public class RedisCacheKeys
    {
        /// <summary>
        /// 生成邀请码
        /// </summary>
        public const string GenerateInviteCode = "GenerateInviteCode";

        /// <summary>
        /// 用户和角色下拉列表 名称UserAndRoleDropListName: systemId
        /// </summary>
        public const string UserAndRoleDropListName = "UserAndRoleDropListName";

        /// <summary>
        /// 用户设置
        /// </summary>
        public const string SettingInfo = "SettingInfo";

        /// <summary>
        /// signalr连接
        /// </summary>
        /// <param name="systemKey"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public static string SignalRCacheKey(string systemKey, int userId)
        {
            return $"user-center:connections:{systemKey?.ToLower()}-user:{userId}";
        }
    }
}
